<%@page import="java.util.Calendar"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String basepath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<% 
				Calendar c = Calendar.getInstance(); 
				long nowMills = c.getTimeInMillis()/1000; 
				String showtime;
				if((session.getAttribute("time") != null)) {
					long i = Long.valueOf(session.getAttribute("time").toString());
					if((nowMills - i)>60*3) {
						showtime = "";
					} else {
						showtime = Long.toString(60*3-(nowMills - i)) + "s后可再次";
					}
				} else {
					showtime = "";
				};
				%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>创业网--创业辅导</title>
<style type="text/css">
body,ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,div
{	margin:0;
	padding:0;
}
div{
	box-sizing:border-box; 
	-moz-box-sizing:border-box;
	-webkit-box-sizing:border-box;
}
.clearfix:before,.clearfix:after{ 
    content:""; 
    display:table; 
} 
.clearfix:after{clear:both;} 
.clearfix{ 
 *zoom:1;/*IE/7/6*/
}
.top{
	width: 875px;
	height: 70px;
	margin: 0 auto;
}
.top>a>img{
	width:325px;
}
.top>div{
	margin-top: 15px;
	float: right;
}
.top>div>p{
	margin-top: 15px;
	font-size: 14px;
}
.top>div>p>a{
	text-decoration: none;
}
.top>div>p>a:hover{
	color: #90c624;
}
.body_top{
	padding-top: 20px;
	width: 100%;
	height: 100px;
	background-color: #f0f0f0;
}
.body_top>div{
	width: 870px;
	height: 85px;
	margin:0 auto;
	padding-top:10px; 
}
.body_top>div>p{
	font-family:"微软雅黑";
	color: #90c624;
	font-size:40px;
	font-weight:900;
	display: inline-block;
}
.body_top>div>span{
	font-size: 14px;
	color: #8f8f8f;
	float: right;
	margin-top: 20px;
}
.body_top>div>a>img{
	float: right;
	margin: 17px 5px;
}
.body_top>div>div{
	display: inline-block;
}
.body_top>div>div>p{
	font-weight:500;
	letter-spacing: 2px;
	font-size: 18px;
	color: #8f8f8f;
}
.body_top>div>div>.last_p{
	color: #90c624;
	font-size: 12px;
	letter-spacing: 0px;

}
.body_wrap{
	width: 100%;
	background: #f7f7f7;
	padding-top: 50px;
}
.body_wrap .middle{
	width: 870px;
	height: 630px;
	margin: 0 auto;
}
.body_wrap .middle .left{
	float: left;
	height: 630px;
}
.body_wrap .left_top{
	width: 180px;
	height: 120px;
	color: #96c720;
	font-size: 20px;
	text-align: center;
}
.body_wrap .left_top .last_p{
	font-size:30px;
	font-weight: bolder;
	line-height:65px;
}
.body_wrap .left_botton{
	width: 180px;
	height: 70px;
	font-size: 15px;
	color: #6d6d6d;
	background-color: #f0f0f0; 
}
.body_wrap .left_botton>p{
	padding:10px 35px;
	cursor: pointer;
}
.body_wrap 	.p_click{
	background: #fff;
	border-left: 3px solid #96c720;
}
.body_wrap .left_botton>p:hover{
	background: #fff;
	border-left: 3px solid #96c720;
}
.body_wrap .right1,.right2,.right3{
	float: left;
	width: 600px;
	height: 430px;
	border-left: 2px solid #96c720;
	margin-left: 50px;
	padding-left:50px;
	color: #969798;
}
.body_wrap .right .notice{
	background: url(img/notice.png) no-repeat;
	padding-left: 40px;
	line-height: 20px;
}
.body_wrap .right>p{
	line-height: 60px;
}
.body_wrap .right>p>b{
	display:inline-block;
	text-align: right;
	width: 70px;
}
.body_wrap .right>p>input{
	width: 360px;
	height: 30px;
	margin-left: 20px;
}
.right2,.right3{
	display: none;
}
.right>div.right_bottom{
	margin-top: 20px;
	width: 360px;
	padding-left: 90px;
}
.right>div.right_bottom>.yz_data{
	width: 110px;
	height: 25px;
	float: left;	
}
.right>div.right_bottom>div{
	margin-left: 20px;
	float: left;
}
.right>div.right_bottom>input.submit{
	width: 80px;
	height: 30px;
	color: #fff;
	background-color: #96c720;
	border: 1px solid #ccc;
	border-radius:5px;
	margin-top: 50px;
}

</style>
</head>
<body>

<div class="top" id="top">
		<a href="index"><img src="img/logo.png" alt="重庆邮电大学" /></a>
		<div>
			<p>欢迎您光临本网站！|<a href="index">返回首页</a>|</p>
		</div>	
</div>
	<div class="body_top">
		<div>
			<p>找回密码</p>
		    <div>
			    <p>REGISTER</p>
			    <p class="last_p">GET CLOSER TO THE DREAM</p>
		    </div>
		    <a href="index"><img src="img/weizhi.png"></a>
		    <span>当前位置：<span>首页</span>><span>注册</span></span>
		</div>
	</div>
	<div class="body_wrap">
		<div class="middle">
			<div>
			<form action="getbPass_info" method="post">
				<div class="right right1">
					<p class="notice">请认真填写</p>
					<p><b>帐号</b><input id="valimail" name="loname" type="text"/>只能为邮箱</p>
					<p><b>回执</b><input type="password" name="status"/><button type="button" id="sendStatus"><%=showtime %>发送邮箱</button></p>
					<p><b>新密码</b><input type="password" name="password"/></p>
					<p><b>确认密码</b><input type="password" /></p>
					<div class="right_bottom clearfix">
						<input type="text" name="code" id="codeCheck" class="yz_data"/> <div><img src="safecode" alt="验证码" id="regCode" onclick="changeImg()" /></div>
						<input type="submit" value="注册" class="submit"/>
					</div>
				</div>
			</form>
			</div>	
		</div>
	</div>
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
<script type="text/javascript">
	function changeImg(){
		$("#regCode").attr("src","safecode?d="+new Date().valueOf());
	}
	//用户名验证
	$("#sendStatus").click(function(){
		var mail = $("#valimail").val();
		$.ajax({
			type: "post",
			url: "ajax/resetPass",
			data: {name : mail},
			dataType: "text",
			success:function(data){
				alert(data);
			}
		}); 
	});
	$("#valimail").blur(function(){
		var mail = $("#valimail").val();
		$.ajax({
			type: "post",
			url: "ajax/nameIsOk",
			data: {name : mail},
			dataType: "text",
			success:function(data){
				alert(data);//true 账号可以用，false就不能
			}
		}); 
	});
	function chuanzhi(d){
		document.getElementById('titletype').value=d;
	};
	//验证码验证
	$("#codeCheck").blur(function(){
		var code = $("#codeCheck").val();
		$.ajax({
			type: "post",
			url: "ajax/codeCheck",
			data: {name : code},
			dataType: "text",
			success:function(data){
				alert(data);//true 验证码正确
			}
		}); 
	});
</script>	
</body>
</html>